From c4d2bb0a983de5a1068da512970113482caf392a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 27 Feb 2004 01:34:11 +0000 Subject: [PATCH] Classifiy Page Up/Down as cursor move, but not Home and End. Fri Feb 27 02:33:21 2004 Matthias Clasen * gtk/gtkentry.c (keyval_is_cursor_move): Classifiy Page Up/Down as cursor move, but not Home and End. * gtk/gtkentry.c (gtk_entry_completion_key_press): Lets Page Up/Down jump to the ends of the list, not Home and End - since we're not scrolling yet, a "page" is always the complete list. (#127430, Marco Pesenti Gritti) Fri Feb 27 00:39:11 2004 Matthias Clasen * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): * gtk/gtkcombobox.c (gtk_combo_box_menu_destroy): Don't let the priv pointers dangle. (#127623, Damon Chaplin) --- ChangeLog | 16 ++++++++++++++++ ChangeLog.pre-2-10 | 16 ++++++++++++++++ ChangeLog.pre-2-4 | 16 ++++++++++++++++ ChangeLog.pre-2-6 | 16 ++++++++++++++++ ChangeLog.pre-2-8 | 16 ++++++++++++++++ gtk/gtkcombobox.c | 13 +++++++++++++ gtk/gtkentry.c | 11 ++++++----- 7 files changed, 99 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e81e1e343a..c3724cb440 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +Fri Feb 27 02:33:21 2004 Matthias Clasen + + * gtk/gtkentry.c (keyval_is_cursor_move): Classifiy Page Up/Down as + cursor move, but not Home and End. + + * gtk/gtkentry.c (gtk_entry_completion_key_press): Lets Page Up/Down + jump to the ends of the list, not Home and End - since we're not + scrolling yet, a "page" is always the complete list. (#127430, Marco + Pesenti Gritti) + +Fri Feb 27 00:39:11 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): + * gtk/gtkcombobox.c (gtk_combo_box_menu_destroy): Don't let + the priv pointers dangle. (#127623, Damon Chaplin) + Thu Feb 26 17:31:34 2004 Manish Singh * gdk/x11/xsettings-client.c (read_settings): fix ytpo: s/eles/else/ diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e81e1e343a..c3724cb440 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,19 @@ +Fri Feb 27 02:33:21 2004 Matthias Clasen + + * gtk/gtkentry.c (keyval_is_cursor_move): Classifiy Page Up/Down as + cursor move, but not Home and End. + + * gtk/gtkentry.c (gtk_entry_completion_key_press): Lets Page Up/Down + jump to the ends of the list, not Home and End - since we're not + scrolling yet, a "page" is always the complete list. (#127430, Marco + Pesenti Gritti) + +Fri Feb 27 00:39:11 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): + * gtk/gtkcombobox.c (gtk_combo_box_menu_destroy): Don't let + the priv pointers dangle. (#127623, Damon Chaplin) + Thu Feb 26 17:31:34 2004 Manish Singh * gdk/x11/xsettings-client.c (read_settings): fix ytpo: s/eles/else/ diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e81e1e343a..c3724cb440 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,19 @@ +Fri Feb 27 02:33:21 2004 Matthias Clasen + + * gtk/gtkentry.c (keyval_is_cursor_move): Classifiy Page Up/Down as + cursor move, but not Home and End. + + * gtk/gtkentry.c (gtk_entry_completion_key_press): Lets Page Up/Down + jump to the ends of the list, not Home and End - since we're not + scrolling yet, a "page" is always the complete list. (#127430, Marco + Pesenti Gritti) + +Fri Feb 27 00:39:11 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): + * gtk/gtkcombobox.c (gtk_combo_box_menu_destroy): Don't let + the priv pointers dangle. (#127623, Damon Chaplin) + Thu Feb 26 17:31:34 2004 Manish Singh * gdk/x11/xsettings-client.c (read_settings): fix ytpo: s/eles/else/ diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e81e1e343a..c3724cb440 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,19 @@ +Fri Feb 27 02:33:21 2004 Matthias Clasen + + * gtk/gtkentry.c (keyval_is_cursor_move): Classifiy Page Up/Down as + cursor move, but not Home and End. + + * gtk/gtkentry.c (gtk_entry_completion_key_press): Lets Page Up/Down + jump to the ends of the list, not Home and End - since we're not + scrolling yet, a "page" is always the complete list. (#127430, Marco + Pesenti Gritti) + +Fri Feb 27 00:39:11 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): + * gtk/gtkcombobox.c (gtk_combo_box_menu_destroy): Don't let + the priv pointers dangle. (#127623, Damon Chaplin) + Thu Feb 26 17:31:34 2004 Manish Singh * gdk/x11/xsettings-client.c (read_settings): fix ytpo: s/eles/else/ diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e81e1e343a..c3724cb440 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,19 @@ +Fri Feb 27 02:33:21 2004 Matthias Clasen + + * gtk/gtkentry.c (keyval_is_cursor_move): Classifiy Page Up/Down as + cursor move, but not Home and End. + + * gtk/gtkentry.c (gtk_entry_completion_key_press): Lets Page Up/Down + jump to the ends of the list, not Home and End - since we're not + scrolling yet, a "page" is always the complete list. (#127430, Marco + Pesenti Gritti) + +Fri Feb 27 00:39:11 2004 Matthias Clasen + + * gtk/gtkcombobox.c (gtk_combo_box_list_destroy): + * gtk/gtkcombobox.c (gtk_combo_box_menu_destroy): Don't let + the priv pointers dangle. (#127623, Damon Chaplin) + Thu Feb 26 17:31:34 2004 Manish Singh * gdk/x11/xsettings-client.c (read_settings): fix ytpo: s/eles/else/ diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 265fdfe657..d1ccbe730f 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1499,13 +1499,21 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box) if (combo_box->priv->cell_view) { gtk_widget_unparent (combo_box->priv->arrow); + combo_box->priv->arrow = NULL; + gtk_widget_unparent (combo_box->priv->separator); + combo_box->priv->separator = NULL; + gtk_widget_unparent (combo_box->priv->button); + combo_box->priv->button = NULL; } else { /* will destroy the arrow too */ gtk_widget_unparent (combo_box->priv->button); + + combo_box->priv->button = NULL; + combo_box->priv->arrow = NULL; } /* changing the popup window will unref the menu and the childs */ @@ -1836,6 +1844,7 @@ gtk_combo_box_list_setup (GtkComboBox *combo_box) combo_box->priv->arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); gtk_container_add (GTK_CONTAINER (combo_box->priv->button), combo_box->priv->arrow); + combo_box->priv->separator = NULL; gtk_widget_show_all (combo_box->priv->button); if (combo_box->priv->cell_view) @@ -1937,6 +1946,8 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box) * last unref on button will destroy the arrow */ gtk_widget_unparent (combo_box->priv->button); + combo_box->priv->button = NULL; + combo_box->priv->arrow = NULL; if (combo_box->priv->cell_view) { @@ -1945,9 +1956,11 @@ gtk_combo_box_list_destroy (GtkComboBox *combo_box) NULL); gtk_widget_unparent (combo_box->priv->cell_view_frame); + combo_box->priv->cell_view_frame = NULL; } gtk_widget_destroy (combo_box->priv->tree_view); + combo_box->priv->tree_view = NULL; combo_box->priv->popup_widget = NULL; } diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 1ea81b3371..981830f6dc 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -4532,10 +4532,10 @@ keyval_is_cursor_move (guint keyval) if (keyval == GDK_Down || keyval == GDK_KP_Down) return TRUE; - if (keyval == GDK_Home || keyval == GDK_KP_Home) + if (keyval == GDK_Page_Up) return TRUE; - if (keyval == GDK_End || keyval == GDK_KP_End) + if (keyval == GDK_Page_Down) return TRUE; return FALSE; @@ -4573,9 +4573,10 @@ gtk_entry_completion_key_press (GtkWidget *widget, if (completion->priv->current_selected > matches + actions - 1) completion->priv->current_selected = matches + actions - 1; } - else if (event->keyval == GDK_Home || event->keyval == GDK_KP_Home) - completion->priv->current_selected = -1; - else if (event->keyval == GDK_End || event->keyval == GDK_KP_End) + else if (event->keyval == GDK_Page_Up) + completion->priv->current_selected = 0; + + else if (event->keyval == GDK_Page_Down) completion->priv->current_selected = matches + actions - 1; if (completion->priv->current_selected < 0) -- 2.30.2